$('button').click(function(){
    $.ajax({
        type:'post',
        url:'http://localhost:8088/api/login',
        data:{
            username: $('input[name="username"]').val(),
            password: $('input[name="password"]').val()
        },
        success:function(res){
            console.log(res);
            let user = {
                username:res.resultInfo.nick,
                userImg:res.resultInfo.headerimg
            }
            localStorage.setItem('UserAdmin',JSON.stringify(user))
            location.href = 'index.html'
        }
    })
})